<template>
  <view class="wrapper">
    <view class="item_cell u-flex flex-between u-p-t-10 u-p-b-10 u-border-bottom" v-for="item in list">
      <view class="flex-1 u-p-l-30">{{item.third_spe_name}}</view>
      <navigator :url="`/pages/explore/xuanke?seachvalue=${item.third_spe_name}`" class="color-999 u-p-r-60 u-p-t-20 u-p-b-20">
        选科要求 <u-icon name="arrow-right"></u-icon>
      </navigator>
      <navigator :url="`/pages/explore/zhuanye_detail?code=${item.third_spe_code}`" class="color-999 u-p-r-30 u-p-t-20 u-p-b-20">
        详细信息 <u-icon name="arrow-right"></u-icon>
      </navigator>
    </view>
  </view>
</template>

<script>
  import {request} from "../../util/api";

  export default {
    onLoad(option) {
      this.code = option.code
      this.name = option.n
      uni.setNavigationBarTitle({
        title: option.n
      });
    },

    data() {
      return {
        code: '',
        name: '',
        list: []
      }
    },

    onShow() {
      request({
        url: '/system/wx/CompassSpecialty/getThirdSpecialtyList/' + this.code,
        token: true
      }).then(res => {
        this.list = res.data
      })
    }
  }
</script>

<style scoped>

</style>
